Populating slicers with parameters
Parameters are an advanced feature in Pyramid that allows you to build lists of items that can be used to drive other calculations or logic. Parameter lists are built in Discover or Formulate and can be used to supply a custom list of values for your presentation's slicers to use; for example, you might create a slicer that uses a parameter list that only offers years when your region was in business. This functionality allows your users to select from a shortened list of slicer members that are more relevant to their business than the raw data in the original hierarchy and prevents them from selecting options at runtime that are invalid or return empty results.
Note: You can also use calculations based on parameter lists in your presentations; for example, by including a calculation formula on the presentation as a hidden slicer, and then creating interactions from the slicer to the formula and then to the visual that the calculation affects. You might do this, for example, if you want to work out the sales between the dates selected on the slicers and use those calculated values to filter the visual with the correct data.
Getting your parameter lists
To use parameter lists to supply values for your slicers, they need to have been created in Formulate or Discover with the values you require before you begin this task. If you want to use a formula that is driven by the parameter list, that also needs to be created in advance and made available for use.
- Click here for information about parameters in Formulate
- Click here for information about parameters in Discover
Configure slicers to use a parameter list
To map a slicer to a parameter:
- In the Interaction Manager, select the intersection between the slicer and the content item that it effects (green arrow below).
The Settings panel opens alongside the report items.
- From the Parameter Interactions, check that the correct parameter (blue arrow) is selected. This option is available for selection because the parameter list is associated with the target of this interaction; in this case, the discovery "Cost by Manufacturer."
It is important to notice what this configuration indicates; first, that there is a slicer on slide with the name End Date; second, that the selected checkbox at the interaction of the slicer and visual (Cost by Manufacturer) indicates that the End Date slicer should affect the visual; and, last, that the parameter list with the name "MyCompany_EndDate" that is the target of the interaction supplies the values seen in the slicer at runtime.
Note: In the preceding example, the slicer is just like any other that appears on a presentation and has been given the user-friendly name End Date in its slicer settings. The slicer could contain any values but because the target analytic object contains a parameter list and I have connected the slicer and parameter list in the settings, the values in the slicer are those from the parameter list.
Examples
This example shows a slide with two slicers that filter a visual to only incorporate sales data from certain years. In this type of visual, each of the years is represented by a single row in a matrix grid. At runtime, the user can choose the Start and End dates using the slicers to decide which rows they want to include in their matrix. The slicer values are limited to only those years included in the parameter lists associated with the discovery.
This example shows a slide with two slicers that filter the visual to show the difference in values between the selected start quarter and end quarter. This functionality uses a parameter list to populate the slicers and a calculated value (driven by a formula) that drives the interaction. The slicer that represents the formula is "hidden" from the runtime presentation, because the runtime user interacts with the date slicers and not the calculation.
Note: Notice that the interactions shown below link the slicer drop-downs on the presentation to the hidden calculation that they drive in the Slicers panel (green arrows), and then link the calculation to the visual that it affects (orange arrow).